import { Component, OnInit } from '@angular/core';
import {ActivatedRoute, Router} from "@angular/router";

@Component({
  selector: 'app-driver-home',
  templateUrl: './driver-home.component.html',
  styleUrls: ['./driver-home.component.css']
})
export class DriverHomeComponent implements OnInit {

  userId:string = this.routerInfo.snapshot.queryParams["userId"];

  constructor(
    private routerInfo:ActivatedRoute,
    private router:Router
  ) { }

  ngOnInit() {
  }

  newDriver(){
    this.router.navigate(["driver","new"],{queryParams:{userId:this.userId}});
  }
}
